{extend name="base"/}

{block name="box"}
<div class="layui-container fly-marginTop fly-user-main">
    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
        <li class="layui-nav-item">
            <a href="{{:url('User/home')}}">
                <i class="layui-icon">&#xe609;</i>
                我的主页
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="{{:url('User/userCenter')}}">
                <i class="layui-icon">&#xe612;</i>
                用户中心
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="{{:url('User/set')}}">
                <i class="layui-icon">&#xe620;</i>
                基本设置
            </a>
        </li>
        <li class="layui-nav-item layui-this">
            <a href="{{:url('User/message')}}">
                <i class="layui-icon">&#xe611;</i>
                我的消息
            </a>
        </li>
    </ul>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>


    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="user" id="LAY_msg" style="margin-top: 15px;">
            <!--<button class="layui-btn layui-btn-danger" id="LAY_delallmsg">清空全部消息</button>-->
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>我的消息 ({{$total}})</legend>
            </fieldset>
            <div  id="LAY_minemsg" style="margin-top: 10px;">

                <ul class="mine-msg">
                    {if condition="!empty($messageList)"}
                        {foreach name="messageList" item="val"}
                            <li class="layui-timeline-item">
                                <i class="layui-icon layui-timeline-axis"></i>
                                <div class="layui-timeline-content layui-text">
                                    <h3 class="layui-timeline-title">{{:substr($val.create_time,0,10)}}</h3>
                                    <p>
                                        <a href="{{:url('User/home',['id'=>$val.user_id])}}">
                                            <cite>{{$val.username}}</cite>
                                        </a>
                                        {eq name="$val.sort" value="1"}
                                        回答了您的求解
                                        {else/}
                                        评论了您的帖子
                                        {/eq}
                                        <a href="{{:url('Card/cardBrowse',['id'=>$val.id])}}">
                                            <cite>{{$val.name}}</cite>
                                        </a>
                                    </p>
                                </div>
                            </li>
                        {/foreach}
                    <!--分页显示-->
                    {{$messagePage}}
                    {else/}
                        <div class="fly-none">您暂时没有最新消息</div>
                    {/if}
                </ul>
            </div>
        </div>
    </div>

</div>


<div class="fly-footer">
    <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
    <p>
        <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
        <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
        <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
    </p>
</div>
{/block}